package com.ruoyi.domain;

import java.io.Serializable;

/**
 * 地区#base_area#地理位置信息 包括 国, 省, 市, 区 等级别
 * @TableName base_area
 */
public class BaseArea implements Serializable {
    /**
     * 地区主键#primary
     */
    private Integer areaId;

    /**
     * 所属地区(自连)#foreign#base_area=area_id,area_name
     */
    private Integer areaParId;

    /**
     * 地区名称
     */
    private String areaName;

    /**
     * 地区代号
     */
    private String areaCode;

    /**
     * 区等级#state#0=世界,  1=国,  2=省 , 3=市 , 4=区
     */
    private Integer areaLevel;

    private static final long serialVersionUID = 1L;

    /**
     * 地区主键#primary
     */
    public Integer getAreaId() {
        return areaId;
    }

    /**
     * 地区主键#primary
     */
    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }

    /**
     * 所属地区(自连)#foreign#base_area=area_id,area_name
     */
    public Integer getAreaParId() {
        return areaParId;
    }

    /**
     * 所属地区(自连)#foreign#base_area=area_id,area_name
     */
    public void setAreaParId(Integer areaParId) {
        this.areaParId = areaParId;
    }

    /**
     * 地区名称
     */
    public String getAreaName() {
        return areaName;
    }

    /**
     * 地区名称
     */
    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    /**
     * 地区代号
     */
    public String getAreaCode() {
        return areaCode;
    }

    /**
     * 地区代号
     */
    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    /**
     * 区等级#state#0=世界,  1=国,  2=省 , 3=市 , 4=区
     */
    public Integer getAreaLevel() {
        return areaLevel;
    }

    /**
     * 区等级#state#0=世界,  1=国,  2=省 , 3=市 , 4=区
     */
    public void setAreaLevel(Integer areaLevel) {
        this.areaLevel = areaLevel;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BaseArea other = (BaseArea) that;
        return (this.getAreaId() == null ? other.getAreaId() == null : this.getAreaId().equals(other.getAreaId()))
            && (this.getAreaParId() == null ? other.getAreaParId() == null : this.getAreaParId().equals(other.getAreaParId()))
            && (this.getAreaName() == null ? other.getAreaName() == null : this.getAreaName().equals(other.getAreaName()))
            && (this.getAreaCode() == null ? other.getAreaCode() == null : this.getAreaCode().equals(other.getAreaCode()))
            && (this.getAreaLevel() == null ? other.getAreaLevel() == null : this.getAreaLevel().equals(other.getAreaLevel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAreaId() == null) ? 0 : getAreaId().hashCode());
        result = prime * result + ((getAreaParId() == null) ? 0 : getAreaParId().hashCode());
        result = prime * result + ((getAreaName() == null) ? 0 : getAreaName().hashCode());
        result = prime * result + ((getAreaCode() == null) ? 0 : getAreaCode().hashCode());
        result = prime * result + ((getAreaLevel() == null) ? 0 : getAreaLevel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", areaId=").append(areaId);
        sb.append(", areaParId=").append(areaParId);
        sb.append(", areaName=").append(areaName);
        sb.append(", areaCode=").append(areaCode);
        sb.append(", areaLevel=").append(areaLevel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}